package com.itheima.demo.demo12;

import java.util.function.Supplier;

public class LamaMin {
    public static void main(String[] args) {
        int[]arr={1,2,3,4,-1,7,88};

            method(()->{
                int min=arr[0];
                for (int i : arr) {
                    if (i<min){
                        min=i;
                    }
                }
                return min;
            });
    }

    private static void method(Supplier<Integer> a) {
        Integer i = a.get();
        System.out.println(i);



    }


}
